package util;

import java.util.Map;

/**
 * @author Witthold/Korol
 */
public class DebugOut {
	private DebugOut() {}	// no instanciation please

	private static final boolean main = true;
	private static final boolean botconfig = false;
	private static final boolean bot = false;
	private static final boolean botTalk = false;
	private static final boolean player = false;
	private static final boolean estimation = false;
	private static final boolean bluffing = false;
	private static final boolean potOdds = false;
	private static final boolean shc = false;
	private static final boolean gameStorage = false;
	private static final boolean game = false;
	private static final boolean model = false;
	private static final boolean state = false;
	private static final boolean sql = false;
	private static final boolean sqlHandler = false;
	private static final boolean sqlQuery = false;
	private static final boolean sqlCM = false;
	private static final boolean jni = false;
	private static final boolean util = false;

	public static void showVerboseMain(String asdf) {
		if (main) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseBotConfig(String asdf) {
		if (botconfig) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseBot(String asdf) {
		if (bot) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseBotTalk(String asdf) {
		if (botTalk) {
			System.out.println(asdf);
		}
	}


	public static void showVerbosePlayer(String asdf) {
		if (player) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseEstimation(String asdf) {
		if (estimation) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseBluffing(String asdf) {
		if (bluffing) {
			System.out.println(asdf);
		}
	}


	public static void showVerbosePotEquity(String asdf) {
		if (potOdds) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseShc(String asdf) {
		if (shc) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseHistory(String asdf) {
		if (gameStorage) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseGame(String asdf) {
		if (game) {
			System.out.println(asdf);
		}

	}


	public static void showVerboseModel(String asdf) {
		if (model) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseState(String asdf) {
		if (state) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseSql(String asdf) {
		if (sql) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseSqlHandler(String asdf) {
		if (sqlHandler) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseSqlQuery(String asdf) {
		if (sqlQuery) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseSqlCM(String asdf) {
		if (sqlCM) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseJni(String asdf) {
		if (jni) {
			System.out.println(asdf);
		}
	}


	public static void showVerboseUtil(String asdf) {
		if (util) {
			System.out.println(asdf);
		}
	}


	/**
	 * @param hm - a map with any kind of types
	 * @return a string representation of the Map
	 */
	public static String mapToString(Map<?, ?> hm) {
		StringBuffer qwer = new StringBuffer();
				
		for (Map.Entry<?, ?> entry : hm.entrySet()){
			qwer.append(entry.getKey().toString());
			qwer.append(entry.getValue().toString() + "\n");
		}
		
		String asdf = qwer.toString();
		
		return asdf;
	}

}
